package com.iis.hrms.persistence;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * The persistent class for the jobseeker_history database table.
 */
@Entity
@Table(name = "jobseeker_history")
@NamedQueries({
        @NamedQuery(name = "JobseekerHistory.findAll", query = "SELECT j FROM JobseekerHistory j"),
        @NamedQuery(name = "JobseekerHistory.findById", query = "SELECT j FROM JobseekerHistory j WHERE j.id = :id"),
        @NamedQuery(name = "JobseekerHistory.findByDateHistory", query = "SELECT j FROM JobseekerHistory j WHERE j.dateHistory = :dateHistory")})
public class JobseekerHistory implements Serializable {
    private static final long serialVersionUID = 1L;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(unique = true, nullable = false)
    private String id;

    @Temporal(TemporalType.DATE)
    @Column(name = "date_history", nullable = false)
    private Date dateHistory;

    @Lob()
    @Column(nullable = false)
    private String description;

    // bi-directional many-to-one association to InterviewStatus
    @ManyToOne
    @JoinColumn(name = "id_interview_status", nullable = false)
    private InterviewStatus interviewStatus;

    // bi-directional many-to-one association to JobSeeker
    @ManyToOne
    @JoinColumn(name = "id_jobseeker", nullable = false)
    private JobSeeker jobSeeker;

    // bi-directional many-to-one association to User
    @ManyToOne
    @JoinColumn(name = "id_user", nullable = false)
    private User user;

    // bi-directional many-to-one association to QuestionHistory
    @OneToMany(mappedBy = "jobseekerHistory")
    private List<QuestionHistory> questionHistories;

    public JobseekerHistory() {
    }

    public String getId() {
        return this.id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Date getDateHistory() {
        return this.dateHistory;
    }

    public void setDateHistory(Date dateHistory) {
        this.dateHistory = dateHistory;
    }

    public String getDescription() {
        return this.description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public InterviewStatus getInterviewStatus() {
        return this.interviewStatus;
    }

    public void setInterviewStatus(InterviewStatus interviewStatus) {
        this.interviewStatus = interviewStatus;
    }

    public JobSeeker getJobSeeker() {
        return this.jobSeeker;
    }

    public void setJobSeeker(JobSeeker jobSeeker) {
        this.jobSeeker = jobSeeker;
    }

    public User getUser() {
        return this.user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public List<QuestionHistory> getQuestionHistories() {
        return this.questionHistories;
    }

    public void setQuestionHistories(List<QuestionHistory> questionHistories) {
        this.questionHistories = questionHistories;
    }

}